﻿Imports Oracle.DataAccess
Imports System.Collections.ObjectModel
Imports System.Windows
Class MainWindow
    'Private xImage As BitmapImage
    Private _EmployeeCollection As New ObservableCollection(Of Employee)
    Private Sub MainWindow_Loaded(ByVal sender As Object, ByVal e As System.Windows.RoutedEventArgs) Handles Me.Loaded
        Dim image1 As New BitmapImage(New Uri("d:\user\Supes.jpg"))
        Dim image2 As New BitmapImage(New Uri("d:\user\ab_face.jpg"))

        'xImage = New BitmapImage
        'xImage.BeginInit()
        'xImage.UriSource = New Uri("d:\user\Supes.jpg", UriKind.RelativeOrAbsolute)
        'xImage.EndInit()
        'imgPic.Source = xImage

        _EmployeeCollection.Add(New Employee("Bruce", "Wayne", "25-DEC-1900", image1))
        _EmployeeCollection.Add(New Employee("Clark", "Kent", "15-JAN-1901", image2))
    End Sub

    Private Sub OnButtonClick(ByVal sender As System.Object, ByVal e As System.Windows.RoutedEventArgs)
        ListView1.ItemsSource = _EmployeeCollection
    End Sub

    Public ReadOnly Property EmployeeCollection() As ObservableCollection(Of Employee)
        Get
            Return _EmployeeCollection
        End Get
    End Property
End Class
